AEGetArray
AEGetArray
Convert Apple Event array to Pascal or C array itemType, itemSize, itemCount );
AEArrayDataPointer arrayPtr ; descriptor type
Size maximumSize ; maximum length of returned data DescType *itemType ; item type (descriptor type of array elements)
Size *itemSize ; item size (in bytes) of array elements long * itemCount ; item count
You can use the AEGetArray function to convert an Apple event array (an array created with the AEPutArray function and stored in a descriptor list) into the corresponding Pascal or C array.
The AEGetArray function converts the Apple event array specified by the theAEDescList parameter into the corresponding Pascal or C array.
array.
The arrayType parameter is the Apple event array type to be converted. This is specified by one of the following constants: kAEDataArray, kAEPackedArray,
kAEHandleArray, kAEDescArray, or kAEKeyDescArray.
The arrayPtr parameter is a pointer to the buffer for storing the array. The maximumSize parameter is the maximum length, in bytes, of the data to be returned.
For packed, data, and handle arrays, the itemType parameter returns the
descriptor type of the array elements that are returned.
For packed and data arrays, the itemSize parameter returns the size, in
bytes, of the array elements that are returned.
The itemCount parameter returns the number of items in the resulting array. Result codes
noErr (0) No error
memFullErr (-108) Not enough room in heap zone
errAEWrongDataType (-1703) Wrong descriptor type
errAENotAEDesc (-1704) Not a valid descriptor record
errAEReplyNotArrived (-1718) Reply has not yet arrived